Optimal. Leaf size=34 \[ -\frac {x}{a^2}-\frac {2 \cos (c+d x)}{d \left (a^2+a^2 \sin (c+d x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2759, 8}
\begin {gather*} -\frac {2 \cos (c+d x)}{d \left (a^2 \sin (c+d x)+a^2\right )}-\frac {x}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2759
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=-\frac {2 \cos (c+d x)}{d \left (a^2+a^2 \sin (c+d x)\right )}-\frac {\int 1 \, dx}{a^2}\\ &=-\frac {x}{a^2}-\frac {2 \cos (c+d x)}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(104\) vs. \(2(34)=68\).
time = 0.11, size = 104, normalized size = 3.06 \begin {gather*} \frac {2 \cos ^3(c+d x) \left ((-1+\sin (c+d x)) \sqrt {1+\sin (c+d x)}+\sin ^{-1}\left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (c+d x)} (1+\sin (c+d x))\right )}{a^2 d (-1+\sin (c+d x))^2 (1+\sin (c+d x))^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 37, normalized size = 1.09
method | result | size |
risch | \(-\frac {x}{a^{2}}-\frac {4}{d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\) | \(30\) |
derivativedivides | \(\frac {-2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{a^{2} d}\) | \(37\) |
default | \(\frac {-2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {4}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{a^{2} d}\) | \(37\) |
norman | \(\frac {-\frac {4}{a d}-\frac {8 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a}-\frac {4 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {12 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {8 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {16 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {12 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {x}{a}-\frac {3 x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}-\frac {5 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {7 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {7 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {5 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {3 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}\) | \(277\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.53, size = 56, normalized size = 1.65 \begin {gather*} -\frac {2 \, {\left (\frac {2}{a^{2} + \frac {a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}} + \frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 61, normalized size = 1.79 \begin {gather*} -\frac {d x + {\left (d x + 2\right )} \cos \left (d x + c\right ) + {\left (d x - 2\right )} \sin \left (d x + c\right ) + 2}{a^{2} d \cos \left (d x + c\right ) + a^{2} d \sin \left (d x + c\right ) + a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 95 vs.
\(2 (29) = 58\).
time = 2.67, size = 95, normalized size = 2.79 \begin {gather*} \begin {cases} - \frac {d x \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a^{2} d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a^{2} d} - \frac {d x}{a^{2} d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a^{2} d} - \frac {4}{a^{2} d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \cos ^{2}{\left (c \right )}}{\left (a \sin {\left (c \right )} + a\right )^{2}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 7.75, size = 33, normalized size = 0.97 \begin {gather*} -\frac {\frac {d x + c}{a^{2}} + \frac {4}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.64, size = 28, normalized size = 0.82 \begin {gather*} -\frac {x}{a^2}-\frac {4}{a^2\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________